package com.yaoyou.dao;

import com.yaoyou.model.dataObject.PicShop;
import com.yaoyou.model.dataObject.PicShopExample;
import java.util.List;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.DeleteProvider;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.InsertProvider;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.SelectProvider;
import org.apache.ibatis.annotations.Update;
import org.apache.ibatis.annotations.UpdateProvider;
import org.apache.ibatis.type.JdbcType;

public interface PicShopMapper {
    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table PIC_SHOP
     *
     * @mbggenerated Mon Aug 01 13:55:00 CST 2016
     */
    @SelectProvider(type=PicShopSqlProvider.class, method="countByExample")
    int countByExample(PicShopExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table PIC_SHOP
     *
     * @mbggenerated Mon Aug 01 13:55:00 CST 2016
     */
    @DeleteProvider(type=PicShopSqlProvider.class, method="deleteByExample")
    int deleteByExample(PicShopExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table PIC_SHOP
     *
     * @mbggenerated Mon Aug 01 13:55:00 CST 2016
     */
    @Delete({
        "delete from PIC_SHOP",
        "where PIC_ID = #{picId,jdbcType=INTEGER}"
    })
    int deleteByPrimaryKey(Integer picId);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table PIC_SHOP
     *
     * @mbggenerated Mon Aug 01 13:55:00 CST 2016
     */
    @Insert({
        "insert into PIC_SHOP (PIC_ID, IMG_URL, ",
        "SHOP_INFO_ID)",
        "values (#{picId,jdbcType=INTEGER}, #{imgUrl,jdbcType=VARCHAR}, ",
        "#{shopInfoId,jdbcType=VARCHAR})"
    })
    int insert(PicShop record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table PIC_SHOP
     *
     * @mbggenerated Mon Aug 01 13:55:00 CST 2016
     */
    @InsertProvider(type=PicShopSqlProvider.class, method="insertSelective")
    int insertSelective(PicShop record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table PIC_SHOP
     *
     * @mbggenerated Mon Aug 01 13:55:00 CST 2016
     */
    @SelectProvider(type=PicShopSqlProvider.class, method="selectByExample")
    @Results({
        @Result(column="PIC_ID", property="picId", jdbcType=JdbcType.INTEGER, id=true),
        @Result(column="IMG_URL", property="imgUrl", jdbcType=JdbcType.VARCHAR),
        @Result(column="SHOP_INFO_ID", property="shopInfoId", jdbcType=JdbcType.VARCHAR)
    })
    List<PicShop> selectByExample(PicShopExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table PIC_SHOP
     *
     * @mbggenerated Mon Aug 01 13:55:00 CST 2016
     */
    @Select({
        "select",
        "PIC_ID, IMG_URL, SHOP_INFO_ID",
        "from PIC_SHOP",
        "where PIC_ID = #{picId,jdbcType=INTEGER}"
    })
    @Results({
        @Result(column="PIC_ID", property="picId", jdbcType=JdbcType.INTEGER, id=true),
        @Result(column="IMG_URL", property="imgUrl", jdbcType=JdbcType.VARCHAR),
        @Result(column="SHOP_INFO_ID", property="shopInfoId", jdbcType=JdbcType.VARCHAR)
    })
    PicShop selectByPrimaryKey(Integer picId);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table PIC_SHOP
     *
     * @mbggenerated Mon Aug 01 13:55:00 CST 2016
     */
    @UpdateProvider(type=PicShopSqlProvider.class, method="updateByExampleSelective")
    int updateByExampleSelective(@Param("record") PicShop record, @Param("example") PicShopExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table PIC_SHOP
     *
     * @mbggenerated Mon Aug 01 13:55:00 CST 2016
     */
    @UpdateProvider(type=PicShopSqlProvider.class, method="updateByExample")
    int updateByExample(@Param("record") PicShop record, @Param("example") PicShopExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table PIC_SHOP
     *
     * @mbggenerated Mon Aug 01 13:55:00 CST 2016
     */
    @UpdateProvider(type=PicShopSqlProvider.class, method="updateByPrimaryKeySelective")
    int updateByPrimaryKeySelective(PicShop record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table PIC_SHOP
     *
     * @mbggenerated Mon Aug 01 13:55:00 CST 2016
     */
    @Update({
        "update PIC_SHOP",
        "set IMG_URL = #{imgUrl,jdbcType=VARCHAR},",
          "SHOP_INFO_ID = #{shopInfoId,jdbcType=VARCHAR}",
        "where PIC_ID = #{picId,jdbcType=INTEGER}"
    })
    int updateByPrimaryKey(PicShop record);
}